package com.solcoo.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.solcoo.service.WebService;
import com.solcoo.service.YongHuService;

@Controller
public class WebController {

	@Resource
	private WebService webService;
	@Resource
	private YongHuService yongHuService;
	
    @RequestMapping(value="card.jspDo")
    public ModelAndView index(String merchantType) throws Exception {
    	ModelAndView view = new ModelAndView();
    	
    	view.addObject("shAndCounts", webService.getShanghuLeiXingList());
    	view.addObject("shs", yongHuService.getMerchantList(merchantType));
    	
    	view.setViewName("../card");
		
		return view;
    }
	
}